package org.molamil.acto.commands {
	import org.molamil.acto.core.ns.acto;

	import flash.net.navigateToURL;

	/**
	 * @author Jorge Hernandez
	 */
	public class GotoUrlCommand extends AbstractRemoteCommand {
		
		
		// PROTECTED METHODS
		
		protected override function doExecute():void {
			
			result.acto::_status = CommandResult.STATUS_PENDING;
			
			prepareUrlRequest();
			
			navigateToURL(urlRequest);
			
			result.acto::_status = CommandResult.STATUS_OK;
			
			dispatchEvent(new CommandsEvent(CommandsEvent.COMMAND_EXECUTE_COMPLETE, false, false, null, context, request, session, result, null, this));
			
		}
		
		
	}
	
}
